package nc.ui.pr.pr1125;

import java.util.Hashtable;

import nc.bs.framework.common.NCLocator;
import nc.itf.fdc.pub.IFdcPubServ;
import nc.ui.pr.pub.bsdelegate.PRBusinessDelegator;
import nc.vo.fdc.pub.QueryInfoVO;
import nc.vo.pr.pr1125.RentOutCheckVO;
import nc.vo.pr.pr1125.RentOutGoodsVO;
import nc.vo.pr.pr1125.RentOutHouseVO;
import nc.vo.pr.pr1125.RentReckoningVO;
import nc.vo.pr.pr1125.RentReturnBailVO;

public class PROutPactDeleagter extends PRBusinessDelegator {

	private String[] m_ChildrenVoNames = new String[]{
			RentOutHouseVO.class.getName(),
			RentOutCheckVO.class.getName(),
			RentReckoningVO.class.getName(),
			RentReturnBailVO.class.getName(),
			RentOutGoodsVO.class.getName()
	};
	
	public Hashtable loadChildDataAry(String[] tableCodes, String key)
			throws java.lang.Exception {
//		Hashtable retHt = new Hashtable();
//		if(m_ChildrenVoNames != null){
//			for(int i=0; i<m_ChildrenVoNames.length; i++){
//				
//				CircularlyAccessibleValueObject[] childVOs = queryBodyAllData(Class.forName(m_ChildrenVoNames[i]), IBillType.MANAGEMENT_HIRE_PUT_OUT_TYPE, key, null);
//				if(childVOs != null){
//					retHt.put(tableCodes[i],childVOs);
//				}				
//			}			
//		}		
//		return retHt;
		QueryInfoVO[] vos = new QueryInfoVO[]{
				new QueryInfoVO(tableCodes[0],RentOutHouseVO.class,"pk_out='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[1],RentOutCheckVO.class,"pk_out='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[2],RentReckoningVO.class,"pk_out='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[3],RentReturnBailVO.class,"pk_out='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[4],RentOutGoodsVO.class,"pk_out='" + key + "' and isnull(dr,0)=0")
		};
		return NCLocator.getInstance().lookup(IFdcPubServ.class).queryChildDatas(vos);
	}
}
